package name.huzhenbo.java.patterns.interpreter;

class AndExp {
    private BooleanExp operand1;
    private BooleanExp operand2;

    public AndExp(BooleanExp operand1, BooleanExp operand2) {
        this.operand1 = operand1;
        this.operand2 = operand2;
    }

    public boolean evaluate(Context context) {
        return operand1.evaluate(context) && operand2.evaluate(context);
    }
}
